Skip to content

Add LookbackEndOf (LE) cycle type#78

Merged
saturnflyer merged 1 commit into
mainfrom
feature/lookback-end-of-period
Apr 11, 2026
Merged

Add LookbackEndOf (LE) cycle type#78
saturnflyer merged 1 commit into
mainfrom
feature/lookback-end-of-period

Conversation

@saturnflyer
Copy link
Copy Markdown
Member

Summary

  • Adds a new LE cycle type (SOF::Cycles::LookbackEndOf) that behaves like Lookback but rounds the window boundary to the end of the calendar period
  • Updates the parser regex to recognize LE as a two-character kind (placed before L in the alternation)
  • Adds lookback_end_of? to the kind_inquiry delegate list in Cycle

Behavior

V1LE24M with a completion on April 9, 2024 (one day before the exact 24-month boundary):

  • Window start rounds down to April 1, 2024 → completion qualifies
  • Expiration rounds up to April 30, 2026 (end of the month the boundary falls in)

Supports all period types: D, W, M, Q, Y.

@saturnflyer saturnflyer force-pushed the feature/lookback-end-of-period branch from e2332b9 to cba607c Compare April 10, 2026 21:57
Adds a new LE notation for cycles that behave like Lookback but round
the window boundary to the end of the calendar period, preventing
completions from expiring mid-period. Supports D, W, M, Q, Y periods.

Added: LookbackEndOf (`LE`) cycle type — lookback window that expires at end of calendar period
Version: minor
@saturnflyer saturnflyer force-pushed the feature/lookback-end-of-period branch from cba607c to 273ab84 Compare April 10, 2026 22:21
@saturnflyer saturnflyer requested a review from a team April 10, 2026 22:22
@saturnflyer saturnflyer merged commit 2d969da into main Apr 11, 2026
2 checks passed
@saturnflyer saturnflyer deleted the feature/lookback-end-of-period branch April 27, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants